from encrpty import EncrptyUtil
import urllib
import base64


def decode_http(ls_infor):
	ls_infor = ls_infor.encode('ascii')
	str_base = base64.urlsafe_b64decode(ls_infor)
	#str_base = urllib.unquote(ls_infor)
	str_base = str_base.decode('utf-8')
	print str_base
	ls_infor = EncrptyUtil().decrypt(str_base)
	return ls_infor



ls_str = 'eGp1ZXl9c2pBVWd3YmRqb24ncHF0bnU-ODg1Mjsrb2t-QTU1NTkvNDYvMjkyND0yNDo0NSw-MzA4Oiw-NzQ4OipycWhiZG1vbj40ODEzMzY4ODEyOzUwNjUx'
print decode_http(ls_str)

#'eGp1YnZ9c2c-cGd6JnZ0d3F0QTs0MTMzJ29yaV9obnBvPy4pbWZ5QzMwNzsxNjgxNDgyMzwxM0A6MDI9NjMyNS86MzAyMiZzdHJrfkE0KFV1Y2RrN0IqLHl2ZGhvNT82ODIyMDc1NDY1Ojk1NSl2c2FpbDNDNjU6OTk0Mzc0MjgwOjk1'
# "eGp1YnZ9c2c-cGd6JnZ0d3F0QTs0MTMzJ29yaV9obnBvPy4pbWZ5QzMwNzsxNjgxNDcxNDwxM0A6NTI9NjMyNS86MzAyMiZzdHJrfkE0KFV1Y2RrN0IqLHl2ZGhvNT82ODIyMDc1NDY1Ojk1NSl2c2FpbDNDNjU6OTk0Mzc0MjgwOjk1"
# "eGp1YnZ9c2c-cGd6JnZ0d3F0QTs0MTMzJ29yaV9obnBvPy4pbWZ5QzMwNzsxNjgxNDcxNDwxM0A6NTI9NjMyNS86MzAyMiZzdHJrfkE0KFV1Y2RrN0IqLHl2ZGhvNT82ODIyMDc1NDY1Ojk1NSl2c2FpbDNDNjU6OTk0Mzc0MjgwOjk1 "
old_bill = '121'


print len(old_bill )